-- GENERATED SPELL FOR [Scourge Banner-Bearer] --


function spell0_31900(pUnit, Event) --@Scourge Banner Aura,Self--
pUnit:FullCastSpellOnTarget(60023,pUnit)
pUnit:RegisterEvent('Sorts_31900', 617, 1)
end

function spell1_31900(pUnit, Event) --@Scourge Banner-Bearer,Self--
pUnit:FullCastSpellOnTarget(59942,pUnit)
pUnit:RegisterEvent('Sorts_31900', 620, 1)
end

function spell2_31900(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(32712,pUnit)
pUnit:RegisterEvent('Sorts_31900', 577, 1)
end

function spell3_31900(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(16583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31900', 600, 1)
end

function Sorts_31900(pUnit, Event)
local choix_sorts_31900 = math.random(0, 3)
if choix_sorts_31900 == 0 then
pUnit:RegisterEvent('spell0_31900', 1, 1)
end
if choix_sorts_31900 == 1 then
pUnit:RegisterEvent('spell1_31900', 1, 1)
end
if choix_sorts_31900 == 2 then
pUnit:RegisterEvent('spell2_31900', 1, 1)
end
if choix_sorts_31900 == 3 then
pUnit:RegisterEvent('spell3_31900', 1, 1)
end
end

function mob31900_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31900', math.random(1500, 3000), 1)
end

function mob31900_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31900_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31900_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31900, 1, 'mob31900_Action')
RegisterUnitEvent(31900, 2, 'mob31900_Leave')
RegisterUnitEvent(31900, 3, 'mob31900_Kill')
RegisterUnitEvent(31900, 4, 'mob31900_Die')
